<?php

/*
 * To change this license header, choose License Headers in Project Properties.
 * To change this template file, choose Tools | Templates
 * and open the template in the editor.
 */

namespace Admin\Model;

/**
 * Description of CourseModel
 *
 * @author gc
 */
class CourseModel extends \Think\Model
{

    //获取课程信息
    public function getCourseById($id)
    {
        $map['id'] = $id;
        return M("Course")->where($map)->find();
    }

    /**
     * 获取所有课程列表
     * @return type
     */
    public function getAllCourse()
    {
        $map['status'] = 1;
        return M("Course")->where($map)->select();
    }

}
